# openbsd-ports

Some ports that I made (or probably in the process of finishing).

**WARNING:** This repo is provided as is, without any warranty, not even implied, that anything will work as expected. Not recommended to be used on a production machine unless tested thoroughly. Please report any bugs in the [issues tab](https://notabug.org/adnan360/openbsd-ports/issues).

## Install

**Basic OpenBSD ports setup:**

```sh
$ cd /tmp
$ ftp https://cdn.openbsd.org/pub/OpenBSD/$(uname -r)/{ports.tar.gz,SHA256.sig}
$ signify -Cp /etc/signify/openbsd-$(uname -r | cut -c 1,3)-base.pub -x SHA256.sig ports.tar.gz
$ doas -s
# cd /usr
# tar xvzf /tmp/ports.tar.gz
```

To run builds as normal user:

`doas nano /etc/mk.conf`
```
WRKOBJDIR=/usr/obj/ports
DISTDIR=/usr/distfiles
PACKAGE_REPOSITORY=/usr/packages
```

```sh
$ doas mkdir -p /usr/{obj/ports,distfiles,packages}
$ doas chown -R $USER:$USER /usr/{obj,distfiles,packages} # whole /usr/obj!!
```

**Install a port:**

```sh
git clone --depth=1 https://notabug.org/adnan360/openbsd-ports
cd openbsd-ports
# Copy all ports
find . -not -path '*/\.*' -not -path '\.' -maxdepth 1 -type d -exec doas cp -rv {} /usr/ports \;
# Copy certain port (e.g. badwolf)
doas cp -rv www/badwolf /usr/ports/www/
# Install (e.g. badwolf)
cd /usr/ports/www/badwolf
doas make install
```
